# Build Gyroe on Linux.

echo Compiling the front-end.
gcc -c -ansi -Wall -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_backend.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_emit.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_error.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_init.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_main.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_misc.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_parser.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_scanner.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer fe_symtab.c

echo Compiling the back-end.
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer be_execute.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer be_runtime.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer be_w.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer be_main.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer be_alloc.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer be_symtab.c
gcc -c -w -DELINUX -fsigned-char -O2 -finline-functions -ffast-math -fomit-frame-pointer be_inline.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer be_machine.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fomit-frame-pointer be_task.c
gcc -c -w -DELINUX -fsigned-char -O -Os -fno-inline-functions -ffast-math -fomit-frame-pointer be_rterror.c
gcc -c -w -DELINUX -fsigned-char -O -Os -fno-inline-functions -ffast-math -fomit-frame-pointer be_syncolor.c
gcc -c -w -DELINUX -fsigned-char -O2 -ffast-math -fno-defer-pop be_callc.c

echo Linking.
gcc fe_init.o fe_misc.o fe_error.o fe_symtab.o fe_scanner.o fe_emit.o fe_parser.o fe_backend.o fe_main.o be_callc.o be_execute.o be_runtime.o be_w.o be_main.o be_alloc.o be_rterror.o be_symtab.o be_inline.o be_machine.o be_task.o be_syncolor.o -lm -ldl -oexu

echo Done.
